import Http from "~/apis/utils/http";

class BookBook extends Http {
  async filterData(params?: any) {
    return await this.post("book/filter", params);
  }

  deleteById(id: any) {
    return this.delete(`book/delete/${id}`);
  }

  deleteMany(ids: any) {
    return this.post("book/deleteMany", ids);
  }

  update(model: any) {
    return this.post("book/update", model);
  }

  create(model: any) {
    return this.post("book/create", model);
  }
  borrow(bookId: any) {
    return this.post(`book/borrowBook/${bookId}`);
  }
}

export default new BookBook();
